/**
 * 给定N个物品，每个物品Ai元
 * 存在某个上限x，使得购买物品只需要花费min(x, Ai)
 * 总预算是M，问购买所有物品的情况下，x最大是多少
 * 显然二分
 */
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

using llt = long long;
using vi = vector<int>;
using vll = vector<llt>;
using pii = pair<int, int>;
using pll = pair<llt, llt>;
using Real = long double;

int N;
llt M;
vll A;

bool check(llt x){
    llt sum = 0;
    for(auto i : A){
        sum += min(i, x);
    }
    return sum <= M;
}

llt proc(){
    llt sum = accumulate(A.begin(), A.end(), 0LL);
    if(sum <= M) return -1;

    llt left = 1, right = M + M, mid;
    do{
        mid = (left + right) >> 1;
        if(check(mid)) left = mid + 1;
        else right = mid - 1;
    }while(left <= right);
    return right;
}

void work(){ 
    cin >> N >> M;
    A.assign(N, {});
    for(auto & i : A) cin >> i;
    auto ans = proc();
    if(-1 == ans) cout << "infinite" << endl;
    else cout << ans << endl;
	return;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);	
    int nofkase = 1;
	// cin >> nofkase;
	while(nofkase--) work();
	return 0;
}